.petercat-assistant {
  @tailwind utilities;
}

/* animations.css */

/* Shake Animation */
@keyframes shake {
  0% {
    transform: translate3d(100%, 100%, 0) scale(0.3);
    opacity: 0;
  }
  5% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
  6% {
    transform: rotate(-5deg);
    opacity: 1;
  }
  6.4% {
    transform: rotate(5deg);
    opacity: 1;
  }
  6.8% {
    transform: rotate(-5deg);
    opacity: 1;
  }
  7.2% {
    transform: rotate(5deg);
    opacity: 1;
  }
  7.4% {
    transform: rotate(-5deg);
    opacity: 1;
  }
  7.8% {
    transform: rotate(5deg);
    opacity: 1;
  }
  8.2% {
    transform: rotate(-5deg);
    opacity: 1;
  }
  8.4% {
    transform: rotate(5deg);
    opacity: 1;
  }
  33.33% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
  40%, 100% {
    transform: translate3d(100%, 100%, 0) scale(0.3);
    opacity: 0;
  }
}

/* Fade In Animation */
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade In Left Animation */
@keyframes fadeInLeft {
  0% {
    opacity: 0;
    transform: translateX(-50%);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Shake Animation Class */
.petercat-assistant .animate-shake {
  animation: shake 15s infinite;
}

/* Fade In Class */
.petercat-assistant .animate-fade-in {
  animation: fadeIn 0.5s ease-in forwards;
}

/* Fade In Left Class */
.petercat-assistant .animate-fade-in-left {
  animation: fadeInLeft 0.5s ease-out forwards;
}

.petercat-assistant .lui-input-area #question {
  box-shadow: none;
}

.petercat-assistant .chat_item_container {
  position: relative;
  width: 100%;
  max-width: 100vw;
  padding: 16px;
  content-visibility: auto;
  contain-intrinsic-size: 100px;
}
.petercat-assistant .petercat-avatar {
  flex: 0 0 40px;
}
.petercat-assistant .petercat-avatar .ant-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.petercat-assistant .petercat-header {
  font-size: 12px !important;
  line-height: 1 !important;
  color: rgba(0, 0, 0, 0.45) !important;
}

.petercat-assistant .petercat-content-start {
  padding: 8px 16px 8px 16px !important;
  border-radius: 16px !important;
  background: rgba(241, 241, 241, 1) !important;
}

.petercat-assistant .petercat-content-end {
  padding: 8px 16px 8px 16px !important;
  border-radius: 16px !important;
  background: rgba(250, 228, 203, 1) !important;
}

.petercat-assistant .ant-bubble-content {
  min-height: 0 !important;
}


.petercat-assistant-markdown {
  font-size: 14px;
  line-height: 2;
  
  p {
     margin: 0 !important;
  }

  
  a {
    color: #1D4ED8;
    text-decoration: none;
  }

  h1 {
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 30px;
    font-family: Avenir, sans-serif;
    line-height: 38px;
  }

  h1:first-child {
    margin-top: 8px;
  }

  h2 {
    font-size: 24px;
    line-height: 32px;
  }

  h2,
  h3,
  h4,
  h5,
  h6 {
    clear: both;
    margin: 1em 0 0.3em;
    font-weight: 500;
    font-family: Avenir, sans-serif;
  }

  h3 {
    font-size: 20px;
    margin-bottom: 4px;
    font-weight: 600;
    line-height: 30px;
    border-bottom: 1px solid #eaeaea;
  }

  h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
  }

  h5 {
    font-size: 14px;
  }

  h6 {
    font-size: 12px;
  }

  hr {
    clear: both;
    height: 1px;
    margin: 56px 0;
    background: #eaeaea;
    border: 0;
  }

  pre[class*='language-'] {
    background-color: rgba(0, 0, 0, 0.03);
  }

  code {
    margin: 0 0.2em;
    padding-inline: 0.4em;
    padding-block: 0.2em 0.1em;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    color: #d56161;
    border: 1px solid rgba(100, 100, 100, 0.2);
 
  }

  pre>code,
  code[class*='language-'] {
    background: none;
    border: none;
    margin: 0;
    padding: 0;
  }

  code[class*='language-text'] {
    white-space: break-spaces;
    word-break: break-word;
  }

  ul,
  ol {
    margin: 0;
    padding: 0;
  }

  ul:not(:global(.ant-skeleton-paragraph)) > li {
    margin-left: 20px;
    padding-left: 4px;
    list-style-type: circle;

    &:empty {
      display: none;
    }
  }

  ol > li {
    margin-left: 20px;
    padding-left: 4px;
    list-style-type: decimal;
  }

  ul > li > p,
  ol > li > p {
    margin: 0.2em 0;
  }

  strong,
  b {
    font-weight: 500;
  }

  table {
    width: 100%;
    empty-cells: show;
    border: 1px solid #eaeaea;
    border-collapse: collapse;
    border-spacing: 0;
    background-color: #fff;

    img {
      max-width: 100%;
    }
  }

  table th {
    color: #5c6b77;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.02);
  }

  table th,
  table td {
    padding: 4px 12px;
    text-align: left;
    border: 1px solid #eaeaea;
    line-height: 24px;
  }

  table img {
    max-height: 100px;
  }

  table td:first-child {
    width: 20%;
    font-weight: 500;
    background: #fcfcfc;
    color: rgba(0, 0, 0, 0.85);
  }

  blockquote {
    margin: 0.5em 0;
    padding-left: 0.8em;
    color: #888888;
    font-size: 90%;
    border-left: 4px solid #eaeaea;
  }

  blockquote p {
    margin: 0;
  }

  > br,
  > p > br {
    clear: both;
  }
}
